/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-05-24
 * Time: 23:00
 */

public class Test6 {
    public static void main(String[] args) {
        //数字转字符串
        String s1 = String.valueOf(100);
        String s2 = String.valueOf(99.00);
        String s3 = String.valueOf(true);
        //对象转化为字符串
        String s4 = String.valueOf(new Person("张三", 20));
        System.out.println(s1);
        System.out.println(s2);
        System.out.println(s3);
        System.out.println(s4);

        //字符串转数字
        int data1 = Integer.parseInt("100");
        double data2 = Double.parseDouble("99.00");
        System.out.println(data1);
        System.out.println(data2);
    }
}
